<template>
  <div>
    <van-nav-bar
      title="名字"
      left-text="取消"
      right-text="完成"
      @click-left="$emit('close')"
      @click-right="$emit('onComfirmAddress', addressName)"
    />
    <div class="addressField" >
      <van-field
        v-model="addressName"
        rows="3"
        autosize
        type="textarea"
        maxlength="50"
        placeholder="请输入地址"
        show-word-limit
      />
    </div>
  </div>
</template>

<script>
export default {
  props: {
    value: {
      type: String,
      required: true
    }
  },
  data () {
    return {
      addressName: this.value
    }
  },
  created () {

  },
  mounted () {

  },
  methods: {
  }
}
</script>

<style scoped lang="less">
.addressField {
  padding: 10px;
}
</style>
